package sites.manager.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import sites.manager.common.model.Site;

public interface SiteMapper extends BaseMapper<Site> {

    /**
     * 将site置为非当前站点
     *
     * @return
     */
    @Update("update site set status = '0' ")
    int updateSite2Del();

    /**
     * 将站点置为主站点
     *
     * @param id
     * @return
     */
    @Update("update site set status = '1' where id = #{id}")
    int updateSite2Normal(@Param("id") Long id);

}
